package com.hmall.search.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.hmall.common.dto.PageDTO;
import com.hmall.search.pojo.ItemDoc;
import com.hmall.search.pojo.RequestParams;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ISearchService {
    /*自动补全
    * */
    List<String> getSuggestion(String prefix) throws IOException;
    /*查询过滤
    * */
    Map<String, List<String>> getFilters(RequestParams requestParams) throws IOException;
    /*
    * 基础查询
    * */
    PageDTO<ItemDoc> getSearch(RequestParams requestParams) throws IOException;

    /*监听上架*/
    void saveItemById(Long id) throws IOException;

    /*监听下架*/
    void deleteById(Long id) throws IOException;
}
